Semantics of Parametric Polymorphism in Imperative Programming Languages
نویسندگان
چکیده
Programming languages such as CLU, Ada and Modula-3 have included facilities for parametric polymorphism and, more recently, C++ and Java have also added similar facilities. In this paper, we examine the issues of defining denotational semantics for imperative programming languages with polymorphism. We use the framework of reflexive graphs of categories previously developed for a general axiomatization of relational parametricity constraints implicit in polymorphic functions. We specialize it to the context of imperative programming languages, which in turn involve parametricity constraints implicit in local variables. The two levels of parametricity inherent in such languages can be captured in a pleasing way in ”higher-order” reflexive graphs.
منابع مشابه
Parametric Sheaves for modelling Store Locality
In this paper, we bring together two important ideas in the semantics of Algol-like imperative programming languages. One is that program phrases act on xed sets of storage locations. The second is that the information of local variables is hidden from client programs. This involves combining sheaf theory and parametricity to produce new classes of sheaves. We deene the semantics of an Algol-li...
متن کاملOn the Design of Generic Static Analyzers for Imperative Languages
The design and implementation of precise static analyzers for significant fragments of imperative languages like C, C++, Java and Python is a challenging problem. In this paper, we consider a core imperative language that has several features found in mainstream languages such as those including recursive functions, run-time system and user-defined exceptions, and a realistic data and memory mo...
متن کاملSemantics of Imperative Objects
Context. The object calculi of Abadi and Cardelli provide idealized models of object-oriented programming languages [1]. They have rigorously defined semantics, and they are simple since only objects are considered as primitives. At the same time they are expressive enough to encode all common features of practical (i.e., class-based) object-oriented programming languages like classes, subtypin...
متن کاملA Framework for Concurrent Imperative Programming
The proposed framework provides a general model of concurrent imperative programming. Programs are modeled as formal languages and concurrency as an interleaving (or shuffle) operator. This yields a simple and elegant algebra of programs. The framework supports the views program logic by Dinsdale-Young and others, which generalizes various type systems and separation logic approaches to program...
متن کاملTyping References by Eeect Inference European Symposium on Programming
Hindley/Milner-style polymorphism is a simple, natural, and exible type discipline for functional languages, but incorporating imperative extensions is dii-cult. We present a new technique for typing references in the presence of polymor-phism by inferring a concise summary of each expression's allocation behavior|a type eeect. A simple technique for proving soundness with respect to a reductio...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010